package com.zkthink.ceres.common.enums;

import com.zkthink.exception.BizException;
import lombok.Getter;

/**
 * 店铺服务类型
 */
@Getter
public enum StoreTypeEnum {
    QX(1,"汽修店"),
    BY(2,"保养店"),
    MR(3,"美容店"),
    TM(4,"贴膜店"),
    XC(5,"洗车店"),
    HT(6,"轮胎更换店"),
    JY(7,"救援店"),
    Jyou(8,"加油店");

    private int code;

    private String desc;

    StoreTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static StoreTypeEnum getDscByType(Integer type) {
        for (StoreTypeEnum p : values()) {
            if (p.getCode() == type.intValue()) {
                return p;
            }
        }
        throw new BizException("no support promotionPlan");
    }
}